#define _CRT_SECURE_NO_WARNINGS



#include<iostream>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int main()
{
    int x;
    cin >> x;
    int cur = 0;
    while (x)
    {
        a[x % 10]++;
        x /= 10;
        cur++;
    }
    int sum = 0;
    for (int i = 1; i <= 9; i++)
    {
        if (a[i] > 0)
        {
            a[i]--;
            sum = sum * 10 + i;
            break;
        }
    }
    for (int i = 0; i <= 9; i++)
    {
        while (a[i]--)
        {
            sum = sum * 10 + i;
        }
    }
    cout << sum;
    return 0;
}


